package cn.edu.suse.epilepsy.entity.pojo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @TableName 表示映射的数据表的名称
 *              通过value属性赋值,value可以省略
 *              有多个属性,value不能省略
 *
 * @TableId 表示映射到数据表中的id主键字段上, 并设置增长策略
 *
 * @TableField 示映射到数据表中的非id的其他字段上
 *
 * value赋值过程中,如果字段名/类名和 数据表中的命名完全相同,注解可以省略
 *
 * @author bill
 * @date 2024/7/2 11:19
 */
//患教活动管理表
@Data
@TableName("tb_patient_edu_activity_management")
public class PatientEduActivity {

    @TableId(value = "patient_edu_activity_id",type = IdType.AUTO)
    private Integer id;

    @TableField("patient_edu_activity_name")
    private String name;

    @TableField("patient_edu_activity_person_count")
    private Integer count;

    @TableField("patient_edu_activity_live_time")
    @JsonFormat(pattern = "yyyy-MM-dd",locale="zh", timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date liveTime;

    @TableField("patient_edu_activity_signup_start_time")
    @JsonFormat(pattern = "yyyy-MM-dd",locale="zh", timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date signupStartTime;

    @TableField("patient_edu_activity_signup_end_time")
    // 处理json字符串中日期的格式
    @JsonFormat(pattern = "yyyy-MM-dd",locale="zh", timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date signupEndTime;

    @TableField("patient_edu_activity_money")
    private Integer money;

    @TableField("patient_edu_activity_host")
    private String host;

    @TableField("patient_edu_activity_viewing_rate")
    private Integer viewingRate;

    @TableField("patient_edu_activity_status")
    private Integer status;

    @TableField("patient_edu_activity_cancel_time")
    @JsonFormat(pattern = "yyyy-MM-dd",locale="zh", timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date cancelTime;

    @TableField("patient_edu_activity_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd",locale="zh", timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date endTime;

    @TableField("patient_edu_activity_cancel_reason")
    private String cancelReason;

    private Integer continueTime;

    private String activityDescription;




}
